// 字体大小兼容
(function (doc, win) {
  const docEl = doc.documentElement
  const resizeEvt = 'orientationchange' in win ? 'orientationchange' : 'resize'
  const recalc = function () {
    const clientWidth = docEl.clientWidth
    if (clientWidth === undefined) return
    docEl.style.fontSize = 75 * (clientWidth / 750) + 'px'
  }
  if (doc.addEventListener === undefined) return
  win.addEventListener(resizeEvt, recalc, false)
  doc.addEventListener('DOMContentLoaded', recalc, false)
})(document, window)
